<template>
	<view>
		<view class="c1" v-for="item in list" @click="tonext(item.sellerId)">
			<view class="c2">
				<image :src="'http://124.93.196.45:10001'+item.imgUrl"></image>
			</view>
			<view class="c3">
				<text>{{item.sellerName}}</text>
				<text>评分：{{item.score}}</text>
				<text>地址：{{item.address}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			getlist(){
				this.api.get('/prod-api/api/takeout/collect/list').then(res=>{
					this.list=res.data.rows
				})
			},
			tonext(id){
				uni.navigateTo({
					url:'/pages/other/takaway/takeawayDetail/takeawayDetail?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
.c1{
		display: flex;
		border-bottom: 2px solid #ffaa7f;
		.c2{
			width: 40%;
			// height: 150px;
			image{
				width: 150px;
				height: 150px;
				margin-top: 15px;
				border-radius: 15px;
				margin-left: 15px;
				margin-bottom: 15px;
			}
		}
		.c3{
			display: flex;
			flex-direction: column;
			margin-top: 20px;
			margin-left: 20px;
			line-height: 40px;
		}
	}
</style>
